package com.yj.inventory.dto;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import javax.validation.constraints.NotNull;
import java.math.BigDecimal;
import java.time.LocalDateTime;

/**
 * Copyright 2017 (C) Yunjian-VC
 * Created on : 2017/12/12
 * Author     : Unbelievable9
 **/
@Data
public class InventoryUpdateDto {

    @NotNull(message = "库存ID不能为空")
    @ApiModelProperty(value = "库存ID", required = true)
    private Integer id;

    @NotNull(message = "记录时间不能为空")
    @ApiModelProperty(value = "记录时间", required = true)
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private LocalDateTime record_time;

    @NotNull(message = "库存数量不能为空")
    @ApiModelProperty(value = "库存数量(吨)", required = true)
    private BigDecimal amount;
}
